package git.LiuZhanHong.Demo3_18;


public class main {
    public static void main(String[] args) {
        //创建两个汽车对象。
        Car1 car1 = new Car1("BMW", "red");
        Car2 car2 = new Car2("宝马", "黑色");
        //调用方法
        System.out.println("---------- car1 ----------");
        car1.drive();
        car1.horn("BMW");
        System.out.println("---------- car2 ----------");
        car2.drive();
        car2.horn(3);
        System.out.println("-------------------------------");
        System.out.println("-------------------------------");
        System.out.println("---------- 圆 ----------");
        //创建圆形对象。
        Rotundity rotundity = new Rotundity("圆", 10);
        // rotundity.drawing();
        rotundity.area();
        System.out.println("---------- 矩形 ----------");
        // 创建矩形对象
        Rectangle rectangle = new Rectangle("长方形",5,6);
        // rectangle.drawing();
        rectangle.area();



    }
}
